var mongoose = require('mongoose');
var config   = require('../config');

if(config.dev == 'DEV'){
    return;
}
mongoose.connect(config.mongoDB, {
    server: {poolSize: 20}
}, function (err) {
    if (err) {
        console.error('connect to %s error: ', config.db, err.message);
        process.exit(1);
    }
});

//导出所有的模型信息
require('./wxPayNotify');

exports.WxPayNotify = mongoose.model('WxPayNotify');